package model;

import java.util.List;

/**
 *
 * @author Alexey Bahrushin
 */
public class MoodleAssignment {
    private long id;//assignment id
    private long cmid;//course module id
    private long course;//course id
    private String name;//assignment name
    private int nosubmissions;//no submissions
    private int submissiondrafts;//submissions drafts
    private int sendnotifications;//send notifications
    private int sendlatenotifications;//send notifications
    private int sendstudentnotifications;//send student notifications (default)
    private int duedate;//assignment due date
    private int allowsubmissionsfromdate;//allow submissions from date
    private int grade;//grade type
    private int timemodified;//last time assignment was modified
    private int complectionsubmit;//This field is optional. If enabled, set activity as complete following submission
    private int cutoffdate;//date after which submission is not accepted without an extension
    private int teamsubmission;//This field is optional. If enabled, students submit as a team
    private int requireallteammemberssubmit;//This fiald is optional. If enabled, all team members must submit
    private int teamsubmissiongroupingid;//the grouping id for the team submission groups
    private int blindmarking;//This field is optional. If enabled, hide identities until reveal identities actioned
    private int revealidentities;//show identities for a blind marking assignment
    private String attemptreopenmethod;//method used to control opening new attempts
    private int maxattempts;//maximum number of attempts allowed
    private int markingworkflow;//enable marking workflow
    private int markingallocation;//enable marking allocation
    private int requiresubmissionstatement;//student must accept submission statement
    private List<MoodleAssignmentConfig> assignmentconfigs;//configuration settings

    /**
     * Constructor for the objects, returned by createMoodleAssignment method.
     */
    public MoodleAssignment(long id, long cmid, long course, String name, int nosubmissions, int submissiondrafts, int sendnotifications, int sendlatenotifications, int sendstudentnotifications, int duedate, int allowsubmissionsfromdate, int grade, int timemodified, int complectionsubmit, int cutoffdate, int teamsubmission, int requireallteammemberssubmit, int teamsubmissiongroupingid, int blindmarking, int revealidentities, String attemptreopenmethod, int maxattempts, int markingworkflow, int markingallocation, int requiresubmissionstatement, List<MoodleAssignmentConfig> assignmentconfigs) {
        this.id = id;
        this.cmid = cmid;
        this.course = course;
        this.name = name;
        this.nosubmissions = nosubmissions;
        this.submissiondrafts = submissiondrafts;
        this.sendnotifications = sendnotifications;
        this.sendlatenotifications = sendlatenotifications;
        this.sendstudentnotifications = sendstudentnotifications;
        this.duedate = duedate;
        this.allowsubmissionsfromdate = allowsubmissionsfromdate;
        this.grade = grade;
        this.timemodified = timemodified;
        this.complectionsubmit = complectionsubmit;
        this.cutoffdate = cutoffdate;
        this.teamsubmission = teamsubmission;
        this.requireallteammemberssubmit = requireallteammemberssubmit;
        this.teamsubmissiongroupingid = teamsubmissiongroupingid;
        this.blindmarking = blindmarking;
        this.revealidentities = revealidentities;
        this.attemptreopenmethod = attemptreopenmethod;
        this.maxattempts = maxattempts;
        this.markingworkflow = markingworkflow;
        this.markingallocation = markingallocation;
        this.requiresubmissionstatement = requiresubmissionstatement;
        this.assignmentconfigs = assignmentconfigs;
    }
    /**
     * Used for JSON response wrapping in to the MoodleUser object 
     * in Set<MoodleUser> getUsers(Map<String, String> criteria) method.
     */
    public MoodleAssignment(long id, long cmid, long course, String name, int nosubmissions, int submissiondrafts, int sendnotifications, int sendlatenotifications, int sendstudentnotifications, int duedate, int allowsubmissionsfromdate, int grade, int timemodified, int complectionsubmit, int cutoffdate, int teamsubmission, int requireallteammemberssubmit, int teamsubmissiongroupingid, int blindmarking, int revealidentities, String attemptreopenmethod, int maxattempts, int markingworkflow, int markingallocation, int requiresubmissionstatement) {
        this.id = id;
        this.cmid = cmid;
        this.course = course;
        this.name = name;
        this.nosubmissions = nosubmissions;
        this.submissiondrafts = submissiondrafts;
        this.sendnotifications = sendnotifications;
        this.sendlatenotifications = sendlatenotifications;
        this.sendstudentnotifications = sendstudentnotifications;
        this.duedate = duedate;
        this.allowsubmissionsfromdate = allowsubmissionsfromdate;
        this.grade = grade;
        this.timemodified = timemodified;
        this.complectionsubmit = complectionsubmit;
        this.cutoffdate = cutoffdate;
        this.teamsubmission = teamsubmission;
        this.requireallteammemberssubmit = requireallteammemberssubmit;
        this.teamsubmissiongroupingid = teamsubmissiongroupingid;
        this.blindmarking = blindmarking;
        this.revealidentities = revealidentities;
        this.attemptreopenmethod = attemptreopenmethod;
        this.maxattempts = maxattempts;
        this.markingworkflow = markingworkflow;
        this.markingallocation = markingallocation;
        this.requiresubmissionstatement = requiresubmissionstatement;
    }
    
    /**
     * @return the id
     */
    public long getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(long id) {
        this.id = id;
    }

    /**
     * @return the cmid
     */
    public long getCmid() {
        return cmid;
    }

    /**
     * @param cmid the cmid to set
     */
    public void setCmid(long cmid) {
        this.cmid = cmid;
    }

    /**
     * @return the course
     */
    public long getCourse() {
        return course;
    }

    /**
     * @param course the course to set
     */
    public void setCourse(long course) {
        this.course = course;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the nosubmissions
     */
    public int getNosubmissions() {
        return nosubmissions;
    }

    /**
     * @param nosubmissions the nosubmissions to set
     */
    public void setNosubmissions(int nosubmissions) {
        this.nosubmissions = nosubmissions;
    }

    /**
     * @return the submissiondrafts
     */
    public int getSubmissiondrafts() {
        return submissiondrafts;
    }

    /**
     * @param submissiondrafts the submissiondrafts to set
     */
    public void setSubmissiondrafts(int submissiondrafts) {
        this.submissiondrafts = submissiondrafts;
    }

    /**
     * @return the sendnotifications
     */
    public int getSendnotifications() {
        return sendnotifications;
    }

    /**
     * @param sendnotifications the sendnotifications to set
     */
    public void setSendnotifications(int sendnotifications) {
        this.sendnotifications = sendnotifications;
    }

    /**
     * @return the sendlatenotifications
     */
    public int getSendlatenotifications() {
        return sendlatenotifications;
    }

    /**
     * @param sendlatenotifications the sendlatenotifications to set
     */
    public void setSendlatenotifications(int sendlatenotifications) {
        this.sendlatenotifications = sendlatenotifications;
    }

    /**
     * @return the sendstudentnotifications
     */
    public int getSendstudentnotifications() {
        return sendstudentnotifications;
    }

    /**
     * @param sendstudentnotifications the sendstudentnotifications to set
     */
    public void setSendstudentnotifications(int sendstudentnotifications) {
        this.sendstudentnotifications = sendstudentnotifications;
    }

    /**
     * @return the duedate
     */
    public int getDuedate() {
        return duedate;
    }

    /**
     * @param duedate the duedate to set
     */
    public void setDuedate(int duedate) {
        this.duedate = duedate;
    }

    /**
     * @return the allowsubmissionsfromdate
     */
    public int getAllowsubmissionsfromdate() {
        return allowsubmissionsfromdate;
    }

    /**
     * @param allowsubmissionsfromdate the allowsubmissionsfromdate to set
     */
    public void setAllowsubmissionsfromdate(int allowsubmissionsfromdate) {
        this.allowsubmissionsfromdate = allowsubmissionsfromdate;
    }

    /**
     * @return the grade
     */
    public int getGrade() {
        return grade;
    }

    /**
     * @param grade the grade to set
     */
    public void setGrade(int grade) {
        this.grade = grade;
    }

    /**
     * @return the timemodified
     */
    public int getTimemodified() {
        return timemodified;
    }

    /**
     * @param timemodified the timemodified to set
     */
    public void setTimemodified(int timemodified) {
        this.timemodified = timemodified;
    }

    /**
     * @return the complectionsubmit
     */
    public int getComplectionsubmit() {
        return complectionsubmit;
    }

    /**
     * @param complectionsubmit the complectionsubmit to set
     */
    public void setComplectionsubmit(int complectionsubmit) {
        this.complectionsubmit = complectionsubmit;
    }

    /**
     * @return the cutoffdate
     */
    public int getCutoffdate() {
        return cutoffdate;
    }

    /**
     * @param cutoffdate the cutoffdate to set
     */
    public void setCutoffdate(int cutoffdate) {
        this.cutoffdate = cutoffdate;
    }

    /**
     * @return the teamsubmission
     */
    public int getTeamsubmission() {
        return teamsubmission;
    }

    /**
     * @param teamsubmission the teamsubmission to set
     */
    public void setTeamsubmission(int teamsubmission) {
        this.teamsubmission = teamsubmission;
    }

    /**
     * @return the requireallteammemberssubmit
     */
    public int getRequireallteammemberssubmit() {
        return requireallteammemberssubmit;
    }

    /**
     * @param requireallteammemberssubmit the requireallteammemberssubmit to set
     */
    public void setRequireallteammemberssubmit(int requireallteammemberssubmit) {
        this.requireallteammemberssubmit = requireallteammemberssubmit;
    }

    /**
     * @return the teamsubmissiongroupingid
     */
    public int getTeamsubmissiongroupingid() {
        return teamsubmissiongroupingid;
    }

    /**
     * @param teamsubmissiongroupingid the teamsubmissiongroupingid to set
     */
    public void setTeamsubmissiongroupingid(int teamsubmissiongroupingid) {
        this.teamsubmissiongroupingid = teamsubmissiongroupingid;
    }

    /**
     * @return the blindmarking
     */
    public int getBlindmarking() {
        return blindmarking;
    }

    /**
     * @param blindmarking the blindmarking to set
     */
    public void setBlindmarking(int blindmarking) {
        this.blindmarking = blindmarking;
    }

    /**
     * @return the revealidentities
     */
    public int getRevealidentities() {
        return revealidentities;
    }

    /**
     * @param revealidentities the revealidentities to set
     */
    public void setRevealidentities(int revealidentities) {
        this.revealidentities = revealidentities;
    }

    /**
     * @return the attemptreopenmethod
     */
    public String getAttemptreopenmethod() {
        return attemptreopenmethod;
    }

    /**
     * @param attemptreopenmethod the attemptreopenmethod to set
     */
    public void setAttemptreopenmethod(String attemptreopenmethod) {
        this.attemptreopenmethod = attemptreopenmethod;
    }

    /**
     * @return the maxattempts
     */
    public int getMaxattempts() {
        return maxattempts;
    }

    /**
     * @param maxattempts the maxattempts to set
     */
    public void setMaxattempts(int maxattempts) {
        this.maxattempts = maxattempts;
    }

    /**
     * @return the markingworkflow
     */
    public int getMarkingworkflow() {
        return markingworkflow;
    }

    /**
     * @param markingworkflow the markingworkflow to set
     */
    public void setMarkingworkflow(int markingworkflow) {
        this.markingworkflow = markingworkflow;
    }

    /**
     * @return the markingallocation
     */
    public int getMarkingallocation() {
        return markingallocation;
    }

    /**
     * @param markingallocation the markingallocation to set
     */
    public void setMarkingallocation(int markingallocation) {
        this.markingallocation = markingallocation;
    }

    /**
     * @return the requiresubmissionstatement
     */
    public int getRequiresubmissionstatement() {
        return requiresubmissionstatement;
    }

    /**
     * @param requiresubmissionstatement the requiresubmissionstatement to set
     */
    public void setRequiresubmissionstatement(int requiresubmissionstatement) {
        this.requiresubmissionstatement = requiresubmissionstatement;
    }

    /**
     * @return the assignmentconfigs
     */
    public List<MoodleAssignmentConfig> getAssignmentconfigs() {
        return assignmentconfigs;
    }

    /**
     * @param assignmentconfigs the assignmentconfigs to set
     */
    public void setAssignmentconfigs(List<MoodleAssignmentConfig> assignmentconfigs) {
        this.assignmentconfigs = assignmentconfigs;
    }
}
